<html><head><title>Importing and Exporting Data in Text Format</title><meta name="filename" content="text/common/guide/data_dbase2office"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
table.Tabelle1{
}
span.Tabelle1A{
width:18cm;}
td.Tabelle1A1{
}
p.P1{
}
p.P2{
}
p.P3{
}
p.P4{
}
span.T1{
font-weight:bold;}
span.fr1{
}
</style></head><body>
<p class="P1"><help:key-word value="databases; importing" tag="kw68131_1" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="databases; exporting" tag="kw68131_7" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="databases; text formats" tag="kw68131_6" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="text formats; databases" tag="kw68131_5" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="csv text format; databases" tag="kw68131_4" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="import; tables in text format" tag="kw68131_3" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="export; tables in text format" tag="kw68131_2" xmlns:help="http://openoffice.org/2000/help"/></p>
<p class="Head1"><help:to-be-embedded Eid="data_dbase2office" xmlns:help="http://openoffice.org/2000/help"><help:link Id="68131">Importing and Exporting Data in Text Format</help:link></help:to-be-embedded></p>
<p class="Paragraph">If you want to exchange data with a database which does not have an ODBC link and which does not allow dBase import and export, it is often possible to exchange the data via a common text format.</p>
<p class="Head2">Importing Data Into <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname></p>
<p class="Paragraph">To exchange data in a text format use the <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc import/export filter.</p>
<ol class="L1">
<li class="">
<p class="P2">Export the desired data from the source database in a text format. The CSV text format is highly recommended since it separates data fields by using commas and records by inserting line breaks.</p>
</li>
<li class="">
<p class="P2">Open the data with the "Text CSV" file filter. Select this file filter in the <help:link Id="65703" xmlns:help="http://openoffice.org/2000/help"><span class="T1">Open</span> dialog</help:link> in the <span class="T1">Files of type</span> list box. Select the file and click <span class="T1">Open</span>.</p>
</li>
<li class="">
<p class="P2">You will see the <help:link Id="65608" xmlns:help="http://openoffice.org/2000/help"><span class="T1">Import text files</span></help:link> dialog. Here you can decide which data to include from the text document.</p>
</li>
</ol>
<p class="Paragraph">Once the data is in a <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc spreadsheet, you can edit it as you want. You have two ways of saving the data in a <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> data source:</p>
<ul class="L2">
<li class="">
<p class="P3">Save the current <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc spreadsheet in dBase format in the folder of a dBase database. To do this, choose <span class="T1">File - Save As</span>, then select the <span class="T1">File Type</span> "dBase" and the folder of the dBase database.</p>
</li>
<li class="">
<p class="P3">Check the data range in the <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc spreadsheet and drag the area into a table container in the data source view. The table container is the area on the left of the database explorer that is designated "Tables" (see diagram). An <help:link Id="66193" xmlns:help="http://openoffice.org/2000/help">AutoPilot</help:link> is started automatically.</p>
<p class="Paragraph">You can export the current <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> spreadsheet in a text format which can be read by many other applications.</p>
<ol class="L3">
<li class="">
<p class="P4">Choose <span class="T1">File - Save as</span>.</p>
</li>
<li class="">
<p class="P4">In <span class="T1">Save as type</span> select the filter "Text CSV". Enter a file name and click <span class="T1">Save</span>.</p>
</li>
<li class="">
<p class="P4">This opens the <help:link Id="65617" xmlns:help="http://openoffice.org/2000/help"><span class="T1">Export of text files</span></help:link> dialog, in which you can select the character set, field delimiter and text delimiter. Click OK. A warning informs you that only the active sheet was saved.</p>